package com.battle.pojo.param.authorization;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.battle.pojo.enums.authorized.AuthorizedTypeEnum;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

/**
 * 授权参数
 *
 * @author Joseph.Li
 * @author joseph.li@king-v.com
 * Created in 2022-07-02 14:54
 */
@Data
public class AuthorizationParam {

    /**
     * 授权对象id
     */
    @NotNull(message = "授权对象id不可为空")
    private Long targetId;


    /**
     * 授权资源
     */
    @NotNull(message = "授权资源不可为空")
    private List<Long> resourceIds;



    /**
     * 授权对象类型
     */
    @JsonIgnore
    private Integer targetType=1;

    /**
     * 授权类型 1，允许 2，禁用
     */
    @JsonIgnore
    private AuthorizedTypeEnum authorizationType=AuthorizedTypeEnum.ALLOW;




}
